<?php
	require_once 'class/config_database.php';
	require_once 'class/kamar.php';
	$kamar_dao = new Kamar_Dao($host,$user,$pass,$dbnm);
	$kamar	   = new Kamar();
	if($_FILES['fupload']['name'] !== ""){
	$kamar->room_figure      = $kamar_dao->unggah_photo();
} else {
	$kamar->room_figure       = $photo;
}
	//Proses membentuk objek kamar
	$kamar->rooms_name  =$_POST["rooms_name"];
	$kamar->price		=$_POST["price"];
	$kamar->facility    =$_POST["facility"];
	$kamar->address     =$_POST["address"];
	$kamar->note        =$_POST["note"];
	$kamar->map_lock    ="NULL";
	$kamar_dao->add($kamar);
?>